package com.zsh.boot.controller;

import com.zsh.boot.bean.Person;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * @author zsh
 * @Description
 * @create 2022-02-24 10:49
 */

@Controller
public class ResponseController {

    /**
     * 
     * @return
     */
    @ResponseBody
    @GetMapping("/test/person")
    public Person getPerson(){
        Person person = new Person();
        person.setAge(12);
        person.setUserName("zsh");
        person.setBirth(new Date());
        return person;
    }
}
